<template>
  <div>
    <div class="maintop">
      <i class="mintui mintui-back"
        @click="$router.go(-1)"></i>
      <span class="record">存款记录</span>
    </div>
    <div class="putforwardbox">
      <ul class="tabsItems_item"
        v-for="(list , index) of depositRecordData"
        :key="index">
        <li>
          <h2>时间</h2>
          <p>{{list.grow_start_time | handleTime}}</p>
        </li>
        <li>
          <h2>数额</h2>
          <p>{{list.invest_num}}</p>
        </li>
        <li>
          <h2>周期</h2>
          <p style="line-height:1.2">{{list.grade}}天</p>
        </li>
        <li>
          <h2>到期日</h2>
          <p>{{list.grow_end_time | handleTime}}</p>
        </li>
        <li>
          <h2>预计收益</h2>
          <p>{{list.estimate}}</p>
        </li>
      </ul>
    </div>
    <div v-if="!depositRecordData[0]"
      class="warn c5 fs16">暂无数据...</div>
  </div>
</template>
<script>
import { Indicator } from 'mint-ui';
export default {
  created() {
    this.getDepositRecord();
  },
  data() {
    return {
      depositRecordData: []
    };
  },
  methods: {
    async getDepositRecord() {
      Indicator.open();
      let DepositRecordRes = await this.$http.post(
        "/bus/invest/page",
        this.$qs.stringify({
          pageNum: 0,
          pageSize: 30
        })
      );
      Indicator.close();
      if (DepositRecordRes.data.code == 200) {
        this.depositRecordData = DepositRecordRes.data.data.rsList;
        console.log(this.depositRecordData);
      }
    }
  }
};
</script>

<style lang="scss" scoped src="./styles/index.scss">
</style>
